package com.enation.app.shop.front.policyInsurance.appController;

import com.enation.app.shop.front.policyInsurance.service.InPropectRecordMappre;
import com.enation.app.shop.front.policyInsurance.service.impl.PropectRcord;
import com.enation.framework.action.JsonResult;
import com.enation.framework.util.JsonResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Scope("prototype")
@Controller
@RequestMapping("/app/propectRecordManage")
public class InPropectRecordController {

    @Autowired
    private InPropectRecordMappre inPropectRecordMappre;

    @ResponseBody
    @RequestMapping("/addPropectRecord")
    public JsonResult addPropectRecord(PropectRcord propectRcord){
        try{
            inPropectRecordMappre.addPropectRecord(propectRcord);
            return JsonResultUtil.getSuccessJson("创建成功!");
        }catch (Exception e){
            return JsonResultUtil.getErrorJson("创建失败!");
        }
    }





}
